# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Robert Boisvert <rdboisvert@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=sipp
pkgver=3.6.0
pkgrel=0
pkgdesc="A test tool / traffic generator for the SIP protocol"
url="https://github.com/SIPp/sipp"
arch="all"
license="GPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="linux-headers autoconf automake openssl-dev libpcap-dev ncurses-dev lksctp-tools-dev"
install=""
subpackages=""
source="https://github.com/SIPp/sipp/releases/download/v$pkgver/sipp-$pkgver.tar.gz
	"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	CFLAGS="$CFLAGS -D_GNU_SOURCE" \
	./configure --prefix=/usr \
		--with-openssl \
		--with-pcap \
		--with-sctp
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/share/"$pkgname"
	install -m444 -D pcap/* "$pkgdir"/usr/share/"$pkgname"/
}

sha512sums="eecbc18a18558a3fbc4f7c841d1fc8bd5be4b0c5d2bb363a12faf730f3c6a0773a24f07dbf062e68baf1a93b21686fa09258d0e08b45b4f941eb5d573bb25c12  sipp-3.6.0.tar.gz"
